3.285 \(\int \frac {1}{\sqrt {1-\cos (c+d x)} \sqrt {\cos (c+d x)}} \, dx\)

Optimal. Leaf size=47 \[ -\frac {\sqrt {2} \tanh ^{-1}\left (\frac {\sin (c+d x)}{\sqrt {2} \sqrt {1-\cos (c+d x)} \sqrt {\cos (c+d x)}}\right )}{d} \]

[Out]

-arctanh(1/2*sin(d*x+c)*2^(1/2)/(1-cos(d*x+c))^(1/2)/cos(d*x+c)^(1/2))*2^(1/2)/d

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 47, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.080, Rules used = {2782, 206} \[ -\frac {\sqrt {2} \tanh ^{-1}\left (\frac {\sin (c+d x)}{\sqrt {2} \sqrt {1-\cos (c+d x)} \sqrt {\cos (c+d x)}}\right )}{d} \]

Antiderivative was successfully verified.

[In]

Int[1/(Sqrt[1 - Cos[c + d*x]]*Sqrt[Cos[c + d*x]]),x]

[Out]

-((Sqrt[2]*ArcTanh[Sin[c + d*x]/(Sqrt[2]*Sqrt[1 - Cos[c + d*x]]*Sqrt[Cos[c + d*x]])])/d)

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 2782

Int[1/(Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]*Sqrt[(c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]]), x_Symbol] :> D
ist[(-2*a)/f, Subst[Int[1/(2*b^2 - (a*c - b*d)*x^2), x], x, (b*Cos[e + f*x])/(Sqrt[a + b*Sin[e + f*x]]*Sqrt[c
+ d*Sin[e + f*x]])], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 -
 d^2, 0]

Rubi steps

\begin {align*} \int \frac {1}{\sqrt {1-\cos (c+d x)} \sqrt {\cos (c+d x)}} \, dx &=-\frac {2 \operatorname {Subst}\left (\int \frac {1}{2-x^2} \, dx,x,\frac {\sin (c+d x)}{\sqrt {1-\cos (c+d x)} \sqrt {\cos (c+d x)}}\right )}{d}\\ &=-\frac {\sqrt {2} \tanh ^{-1}\left (\frac {\sin (c+d x)}{\sqrt {2} \sqrt {1-\cos (c+d x)} \sqrt {\cos (c+d x)}}\right )}{d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 0.14, size = 110, normalized size = 2.34 \[ \frac {i e^{-i (c+d x)} \left (-1+e^{i (c+d x)}\right ) \sqrt {1+e^{2 i (c+d x)}} \tanh ^{-1}\left (\frac {1+e^{i (c+d x)}}{\sqrt {2} \sqrt {1+e^{2 i (c+d x)}}}\right )}{\sqrt {2} d \sqrt {-((\cos (c+d x)-1) \cos (c+d x))}} \]

Antiderivative was successfully verified.

[In]

Integrate[1/(Sqrt[1 - Cos[c + d*x]]*Sqrt[Cos[c + d*x]]),x]

[Out]

(I*(-1 + E^(I*(c + d*x)))*Sqrt[1 + E^((2*I)*(c + d*x))]*ArcTanh[(1 + E^(I*(c + d*x)))/(Sqrt[2]*Sqrt[1 + E^((2*
I)*(c + d*x))])])/(Sqrt[2]*d*E^(I*(c + d*x))*Sqrt[-((-1 + Cos[c + d*x])*Cos[c + d*x])])

________________________________________________________________________________________

fricas [B]  time = 0.82, size = 84, normalized size = 1.79 \[ \frac {\sqrt {2} \log \left (-\frac {2 \, {\left (\sqrt {2} \cos \left (d x + c\right ) + \sqrt {2}\right )} \sqrt {-\cos \left (d x + c\right ) + 1} \sqrt {\cos \left (d x + c\right )} - {\left (3 \, \cos \left (d x + c\right ) + 1\right )} \sin \left (d x + c\right )}{{\left (\cos \left (d x + c\right ) - 1\right )} \sin \left (d x + c\right )}\right )}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1-cos(d*x+c))^(1/2)/cos(d*x+c)^(1/2),x, algorithm="fricas")

[Out]

1/2*sqrt(2)*log(-(2*(sqrt(2)*cos(d*x + c) + sqrt(2))*sqrt(-cos(d*x + c) + 1)*sqrt(cos(d*x + c)) - (3*cos(d*x +
 c) + 1)*sin(d*x + c))/((cos(d*x + c) - 1)*sin(d*x + c)))/d

________________________________________________________________________________________

giac [A]  time = 0.62, size = 79, normalized size = 1.68 \[ \frac {\sqrt {2} {\left (\log \left (\sqrt {2} + 1\right ) - \log \left (\sqrt {2} - 1\right ) - \log \left (\sqrt {-\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1} + 1\right ) + \log \left (-\sqrt {-\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1} + 1\right )\right )}}{2 \, d \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1-cos(d*x+c))^(1/2)/cos(d*x+c)^(1/2),x, algorithm="giac")

[Out]

1/2*sqrt(2)*(log(sqrt(2) + 1) - log(sqrt(2) - 1) - log(sqrt(-tan(1/2*d*x + 1/2*c)^2 + 1) + 1) + log(-sqrt(-tan
(1/2*d*x + 1/2*c)^2 + 1) + 1))/(d*sgn(tan(1/2*d*x + 1/2*c)))

________________________________________________________________________________________

maple [B]  time = 0.13, size = 84, normalized size = 1.79 \[ \frac {4 \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \left (-1+\cos \left (d x +c \right )\right ) \sin \left (d x +c \right ) \arctanh \left (\frac {\sqrt {2}}{2 \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}}\right )}{d \sqrt {\cos \left (d x +c \right )}\, \left (2-2 \cos \left (d x +c \right )\right )^{\frac {3}{2}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(1-cos(d*x+c))^(1/2)/cos(d*x+c)^(1/2),x)

[Out]

4/d*(cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*(-1+cos(d*x+c))*sin(d*x+c)*arctanh(1/2*2^(1/2)/(cos(d*x+c)/(1+cos(d*x+c)
))^(1/2))/cos(d*x+c)^(1/2)/(2-2*cos(d*x+c))^(3/2)

________________________________________________________________________________________

maxima [C]  time = 0.99, size = 248, normalized size = 5.28 \[ \frac {\sqrt {2} \log \left (\frac {4 \, {\left ({\left | i \, e^{\left (i \, d x + i \, c\right )} - i \right |}^{2} + 2 \, \sqrt {\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} + 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1} {\left (\cos \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right )^{2} + \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right )^{2}\right )} - 2 \, {\left (\sqrt {2} {\left | i \, e^{\left (i \, d x + i \, c\right )} - i \right |} \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right ) - 2 \, \sqrt {2} \cos \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right )\right )} {\left (\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} + 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1\right )}^{\frac {1}{4}} + 4\right )}}{{\left | i \, e^{\left (i \, d x + i \, c\right )} - i \right |}^{2}}\right )}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1-cos(d*x+c))^(1/2)/cos(d*x+c)^(1/2),x, algorithm="maxima")

[Out]

1/2*sqrt(2)*log(4*(abs(I*e^(I*d*x + I*c) - I)^2 + 2*sqrt(cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x
 + 2*c) + 1)*(cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1))^2 + sin(1/2*arctan2(sin(2*d*x + 2*c), c
os(2*d*x + 2*c) + 1))^2) - 2*(sqrt(2)*abs(I*e^(I*d*x + I*c) - I)*sin(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x +
 2*c) + 1)) - 2*sqrt(2)*cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)))*(cos(2*d*x + 2*c)^2 + sin(2*
d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/4) + 4)/abs(I*e^(I*d*x + I*c) - I)^2)/d

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.02 \[ \int \frac {1}{\sqrt {\cos \left (c+d\,x\right )}\,\sqrt {1-\cos \left (c+d\,x\right )}} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(cos(c + d*x)^(1/2)*(1 - cos(c + d*x))^(1/2)),x)

[Out]

int(1/(cos(c + d*x)^(1/2)*(1 - cos(c + d*x))^(1/2)), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {1}{\sqrt {1 - \cos {\left (c + d x \right )}} \sqrt {\cos {\left (c + d x \right )}}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1-cos(d*x+c))**(1/2)/cos(d*x+c)**(1/2),x)

[Out]

Integral(1/(sqrt(1 - cos(c + d*x))*sqrt(cos(c + d*x))), x)

________________________________________________________________________________________